home *** CD-ROM | disk | FTP | other *** search
- #ifndef FWPRIRAS_H
- #define FWPRIRAS_H
-
- //========================================================================================
- //
- // File: FWPriRas.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWGRDEF_H
- #include "FWGrDef.h"
- #endif
-
- #ifndef FWGCONST_H
- #include "FWGConst.h"
- #endif
-
- #ifndef FWRASTER_H
- #include "FWRaster.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CLASS_ATTR FW_PInk;
- class FW_CLASS_ATTR FW_PStyle;
- class FW_CLASS_ATTR FW_PPicture;
- class FW_CLASS_ATTR FW_PBitmap;
- class FW_CLASS_ATTR FW_CPrivTextBuffer;
- class FW_CLASS_ATTR FW_PFont;
- class FW_CLASS_ATTR FW_CGraphicContext;
- class FW_CLASS_ATTR FW_CRect;
- class FW_CLASS_ATTR FW_CPoint;
- class FW_CLASS_ATTR FW_CGraphicDevice;
- class FW_CLASS_ATTR FW_PPolygon;
- class FW_CLASS_ATTR FW_PIcon;
-
- struct FW_CLASS_ATTR FW_SPlatformRect;
- struct FW_CLASS_ATTR FW_SPlatformPoint;
-
- class FW_CLASS_ATTR ODShape;
-
- //========================================================================================
- // class FW_CPrivRasterizer
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CPrivRasterizer : public FW_CRasterizer
- {
- //---------------------------------------------------------------------------------------
- // Constructor/Destructor
- //
- public:
- FW_CPrivRasterizer();
- virtual ~FW_CPrivRasterizer();
-
- //---------------------------------------------------------------------------------------
- // Rasterizer API
- //
- public:
- virtual void RenderRect(FW_CGraphicContext& gc,
- const FW_CRect& rect,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PStyle& style);
-
- virtual void RenderOval(FW_CGraphicContext& gc,
- const FW_CRect& rect,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PStyle& style);
-
- virtual void RenderRoundRect(FW_CGraphicContext& gc,
- const FW_CRect& rect,
- const FW_CPoint& ovalSize,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PStyle& style);
-
- virtual void RenderArc(FW_CGraphicContext& gc,
- const FW_CRect& rect,
- short startAngle, short arcAngle,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PStyle& style);
-
- virtual void RenderLine(FW_CGraphicContext& gc,
- const FW_CPoint& start,
- const FW_CPoint& end,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PStyle& style);
-
- virtual void RenderRegion(FW_CGraphicContext& gc,
- ODShape* odShape,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PStyle& style);
-
- virtual void RenderPolygon(FW_CGraphicContext& gc,
- const FW_PPolygon& polygon,
- FW_ERenderVerbs renderVerb,
- FW_Boolean autoCloseFrame,
- const FW_PInk& ink,
- const FW_PStyle& style);
-
- virtual void RenderText(FW_CGraphicContext& gc,
- FW_CPrivTextBuffer *textBuffer,
- const FW_CPoint& position,
- FW_TextAlignment textAlignment,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PFont& font);
-
- virtual FW_CFixed RenderTextBox(FW_CGraphicContext& gc,
- FW_CPrivTextBuffer* textBuffer,
- const FW_CRect& box,
- FW_TextBoxOptions options,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PFont& font);
-
- virtual void TextBoxSize(FW_CGraphicContext& gc,
- FW_CPrivTextBuffer *textBuffer,
- const FW_PFont& font,
- FW_TextBoxOptions options,
- FW_CRect& textBox);
-
- virtual void TextExtent(FW_CGraphicContext& gc,
- FW_CPrivTextBuffer* textBuffer,
- const FW_PFont& font,
- FW_CPoint& textExtent);
-
- virtual void RenderPicture(FW_CGraphicContext& gc,
- FW_PPicture picture,
- const FW_CRect& dstRect,
- FW_ERenderVerbs renderVerb);
-
- virtual void RenderBitmap(FW_CGraphicContext& gc,
- FW_PBitmap bitmap,
- const FW_CRect& srcRect,
- const FW_CRect& dstRect,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink);
-
- virtual void RenderIcon(FW_CGraphicContext& gc,
- const FW_PIcon& icon,
- const FW_CRect& rect,
- FW_RenderIconOptions options,
- FW_ERenderVerbs renderVerb);
-
- //---------------------------------------------------------------------------------------
- // New API
- //
- protected:
- FW_PlatformCoordinate PrivTextBox(FW_CGraphicDevice* device,
- FW_CPrivTextBuffer *textBuffer,
- const FW_SPlatformRect& box,
- FW_TextBoxOptions options,
- FW_Boolean draw,
- const FW_PFont& font);
-
- #ifdef FW_BUILD_MAC
-
- FW_Boolean MacSelectInkAndStyle(FW_CGraphicDevice* device,
- FW_EShapeCategories shapeCategory,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink,
- const FW_PStyle& style);
-
- FW_SPlatformPoint MacCalcTextPosition(FW_CGraphicDevice* device,
- short byteCount, const char* text,
- FW_TextAlignment textAlignment,
- const FW_SPlatformPoint& position) const;
-
- void MacStrikeOut(FW_CGraphicDevice* device,
- short beforePosX, short beforePosY);
- #endif
-
- #ifdef FW_BUILD_WIN
- DWORD WinConvertRasterOp(FW_TransferModes transferMode);
- #endif
- };
-
- #endif // FWPRIRAS_H
-